package cn.tedu.account.mapper;

import cn.tedu.account.entity.Account;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.math.BigDecimal;

public interface AccountMapper extends BaseMapper<Account> {
    void decrease(Long userId, BigDecimal money);

    Account selectByUserId(Long userId);

    void updateResidueToFrozen(Long userId,BigDecimal money);     //从可用到冻结
    void updateFrozenToUsed(Long userId,BigDecimal money);      //  从冻结到已使用
    void updateFrozenToResidue(Long userId,BigDecimal money); //从冻结到可用
}
